﻿using System;
using System.Reflection;
using log4net;
using DC2010.Objects;

namespace DC2010.Systems
{
    /// <summary>
    /// This system is used for NPC, Creature handling. Adding new creatures to game, finding them, etc...
    /// </summary>
    public class CreatureSystem : BaseSystem<CreatureInfo, CreatureGfx, CreatureData>
    {
        public override void Init(string code)
        {
            IsUsingInfo = true;
            IsUsingData = true;
            IsUsingGfx = true;

            InfoFileName = "Data\\"+code+"Info.xml";
            GfxFileName = "Data\\"+code+"Gfx.xml";
            DataFileName = "Temp\\" + code + "Data.xml";

            Code = code;

            DateTime dtStart = DateTime.Now;

            base.Init(code);

            log.Info("Core, Creatures init takes: " + (DateTime.Now - dtStart).TotalSeconds + " seconds");
        }
    }
}
